package com.curry.apiprovider.mq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

@Component
public class MqListener {


    private static final Logger LOGGER = LoggerFactory.getLogger(MqListener.class);


    @RabbitListener(queues = "job")
    public void process(String msg) {
        LOGGER.warn("Listener: msg " + msg);
    }

    @RabbitListener(queues = "job")
    public void process( Object obj) {
        LOGGER.warn("Listener: " + obj.toString());
    }
}
